<html>
    <head>
        <title>页面设计</title>
    </head>
    <body >
    <!DOCTYPE html>

    <body>
        <div class="center-align">
            <div class="letter-spacing-example">
        <h1>青春不常在，抓紧谈恋爱</h1><br>
        <form>性别:    <input type="radio" name="sex" value="male">♂男(黎柏成 23215220108）
            <input type="radio" name="sex" value="male">♀女<br>
        </form>
        <label for="year">生日：     请选择年份：</label>
    <select id="year" onchange="updateDays()"></select>
    <label for="month">请选择月份：</label>
    <select id="month" onchange="updateDays()"></select>
    <label for="day">请选择日期：</label>
    <select id="day"></select>
    <script>
        const yearSelect = document.getElementById('year');
        const monthSelect = document.getElementById('month');
        const daySelect = document.getElementById('day');

        // 初始化年份
        const currentYear = new Date().getFullYear();
        for (let year = currentYear; year >= 1900; year--) {
            const option = document.createElement('option');
            option.value = year;
            option.textContent = year;
            yearSelect.appendChild(option);
        }

        // 初始化月份
        const months = [
            '1月', '2月', '3月', '4月', '5月', '6月',
            '7月', '8月', '9月', '10月', '11月', '12月'
        ];
        for (let i = 0; i < months.length; i++) {
            const option = document.createElement('option');
            option.value = i + 1;
            option.textContent = months[i];
            monthSelect.appendChild(option);
        }

        // 更新日期选项
        function updateDays() {
            const year = parseInt(yearSelect.value);
            const month = parseInt(monthSelect.value);
            const daysInMonth = new Date(year, month, 0).getDate();

            // 清空日期选项
            daySelect.innerHTML = '';

            // 添加新的日期选项
            for (let day = 1; day <= daysInMonth; day++) {
                const option = document.createElement('option');
                option.value = day;
                option.textContent = day;
                daySelect.appendChild(option);
            }
        }

        // 初始化日期选项
        updateDays();

        // 获取用户选择的日期
        function getSelectedDate() {
            const year = yearSelect.value;
            const month = monthSelect.value;
            const day = daySelect.value;
            const selectedDate = `${year}-${month}-${day}`;
            alert('你选择的生日是：' + selectedDate);
        }
    </script><br>
    <form autocomplete="on">
        所在地区：<input type="text" name="fname"><br>
    </form>
    <form>婚姻状况:<input type="radio" name="sex" value="male">未婚
        <input type="radio" name="sex" value="male">已婚
        <input type="radio" name="sex" value="male">离婚<br>
    </form>
    <form autocomplete="on">
        学历：<input type="text" name="fname"><br>
    </form>
    <form>喜欢的类型:<input type="radio" name="sex" value="male">妩媚的
        <input type="radio" name="sex" value="male">可爱的
        <input type="radio" name="sex" value="male">小鲜肉
        <input type="radio" name="sex" value="male">老腊肉
        <input type="radio" name="sex" value="male">都喜欢<br><br>
    </form>
    <label for="advice">个人介绍：</label>
    <textarea name="advice" id="advice" rows="5" cols="50"></textarea>
    <input type="submit" value="免费注册"><br>
    <form>          <input type="radio" name="sex" value="male">我同意注册条款和会员加入标准
    </form>
<a href=""target="-blank">我是会员，立即登录</a><br><br>
<h5>我承诺</h5><br>
<h4>○年满十八岁，单身</h4>
<h4>○抱着严肃的态度</h4>
<h4>○真诚寻找另一半</h4>
    </body>
</html>
